The Tab View Component > FTabView.getDataProvider() |
FTabView.getDataProvider()
Availability
Flash Player 6.
Usage
myTab_tbv.getDataProvider ()
Parameters
none
Returns
Returns the DataProvider being used to populate the tabs in the component.
Description
Returns the DataProvider being used to populate the tabs within the component. The returned DataProvider should have the following fields:
label |
The name of the tab. |
data |
If specified, contains an Object associated with the tab. |
Notes
The name of the property that contains the name of the tab can be changed using the setLabelField method. The default value is "label".
Example
The following code retrieves the Data Provider from the component and traces the label of the second tab.
var dp = new Array();
dp.push({label: "Tab1"});
dp.push({label: "Tab2"});
dp.push({label: "Tab3"});
myTab_tbv.setDataProvider( dp );
dp = myTab_tbv.getDataProvider( );
trace( "Tab 2: " + dp.getItemAt(1).label ); //trace "Tab 2: Tab2"
See also